Skip to content

Remove duplicated code. #799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

przemekwitek
Copy link
Contributor

@przemekwitek przemekwitek commented Oct 30, 2019

Remove duplicated code in bin/data_frame_analyzer/Main.cc

@droberts195
Copy link
Contributor

droberts195 commented Oct 30, 2019

There's nothing wrong with this change, but I don't think it will fix any bugs.

It removes 3 lines of duplicated code, and it's nice to avoid code duplication so I'm happy to merge it.

But the duplicated code that's removed is just the definition of a lambda, not calling that lambda. So there wasn't any double wrapping of streams before.

So, like I say, I'm happy for this change to be made but it won't help with elastic/elasticsearch#47612 and therefore the commit message should not reference that issue. The commit title should just be something like "Remove duplicated code".

@przemekwitek przemekwitek changed the title Do not wrap output stream twice. Remove duplicated code. Nov 19, 2019
@przemekwitek przemekwitek force-pushed the do_not_wrap_output_stream_twice branch from f77e12f to 311ccb4 Compare November 19, 2019 13:15
@przemekwitek przemekwitek removed the WIP label Nov 19, 2019
@przemekwitek przemekwitek marked this pull request as ready for review November 19, 2019 13:15
@przemekwitek
Copy link
Contributor Author

There's nothing wrong with this change, but I don't think it will fix any bugs.

It removes 3 lines of duplicated code, and it's nice to avoid code duplication so I'm happy to merge it.

But the duplicated code that's removed is just the definition of a lambda, not calling that lambda. So there wasn't any double wrapping of streams before.

So, like I say, I'm happy for this change to be made but it won't help with elastic/elasticsearch#47612 and therefore the commit message should not reference that issue. The commit title should just be something like "Remove duplicated code".

I've changed the title and description of this PR to reflect that it is only about deduplicating code.

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@przemekwitek przemekwitek merged commit 9f2dade into elastic:master Nov 19, 2019
@przemekwitek przemekwitek deleted the do_not_wrap_output_stream_twice branch November 19, 2019 14:49
przemekwitek added a commit to przemekwitek/ml-cpp that referenced this pull request Nov 19, 2019
przemekwitek added a commit that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants